home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume11 / starchart / part16 < prev    next >
Encoding:
Text File  |  1990-03-25  |  31.5 KB  |  1,089 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v11i044: starchart 3.2 Part 16/32
  3. from: ccount@ATHENA.MIT.EDU
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 11, Issue 44
  7. Submitted-by: ccount@ATHENA.MIT.EDU
  8. Archive-name: starchart/part16
  9.  
  10. #! /bin/sh
  11. # This is a shell archive.  Remove anything before this line, then unpack
  12. # it by saving it into a file and typing "sh file".  To overwrite existing
  13. # files, type "sh file -c".  You can also feed this as standard input via
  14. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  15. # will see the following message at the end:
  16. #        "End of archive 16 (of 32)."
  17. # Contents:  starchart/spo.c.ab
  18. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  19. if test -f 'starchart/spo.c.ab' -a "${1}" != "-c" ; then 
  20.   echo shar: Will not clobber existing file \"'starchart/spo.c.ab'\"
  21. else
  22. echo shar: Extracting \"'starchart/spo.c.ab'\" \(29553 characters\)
  23. sed "s/^X//" >'starchart/spo.c.ab' <<'END_OF_FILE'
  24. X/*  0 */    { 1.0, 1.0, 1.0 },   /* BLACK */
  25. X/*  1 */    {   0,   0,   0 },   /* WHITE */
  26. X/*  2 */    { 1.0,   0,   0 },   /* RED */
  27. X/*  3 */    { 1.0, 0.4,   0 },   /* ORANGE */
  28. X/*  4 */    { 1.0, 1.0,   0 },   /* YELLOW */
  29. X/*  5 */    {   0, 1.0,   0 },   /* GREEN */
  30. X/*  6 */    {   0, 1.0, 1.0 },   /* CYAN */
  31. X/*  7 */    {   0,   0, 1.0 },   /* BLUE */
  32. X/*  8 */    { 1.0,   0, 1.0 },   /* VIOLET */
  33. X/*  9 */    { .5, .5, 1.0 },   /* BLUE_WHITE */
  34. X    /*         Red             Green           Blue          Nameby which
  35. X                                                         type is known */
  36. X/* 10 */    { 0.38937,        0.46526,        0.79493 },    /* B0 */
  37. X/* 11 */    { 0.39501,        0.47146,        0.78847 },    /* B1 */
  38. X/* 12 */    { 0.40103,        0.47792,        0.78151 },    /* B2 */
  39. X/* 13 */    { 0.40640,        0.48355,        0.77526 },    /* B3 */
  40. X/* 14 */    { 0.41341,        0.49071,        0.76701 },    /* B5 */
  41. X/* 15 */    { 0.43251,        0.50914,        0.74412 },    /* B8 */
  42. X/* 16 */    { 0.44342,        0.51897,        0.73079 },    /* B9 */
  43. X/* 17 */    { 0.45181,        0.52618,        0.72042 },    /* A0 */
  44. X/* 18 */    { 0.46931,        0.54026,        0.69847 },    /* A2 */
  45. X/* 19 */    { 0.47958,        0.54792,        0.68541 },    /* A3 */
  46. X/* 20 */    { 0.48538,        0.55205,        0.67797 },    /* A5 */
  47. X/* 21 */    { 0.50879,        0.56731,        0.64752 },    /* F0 */
  48. X/* 22 */    { 0.51732,        0.57231,        0.63627 },    /* F2 */
  49. X/* 23 */    { 0.52348,        0.57573,        0.62810 },    /* F5 */
  50. X/* 24 */    { 0.54076,        0.58447,        0.60496 },    /* F8 */
  51. X/* 25 */    { 0.54853,        0.58799,        0.59446 },    /* G0 */
  52. X/* 26 */    { 0.56951,        0.59623,        0.56584 },    /* G5 */
  53. X/* 27 */    { 0.58992,        0.60244,        0.53765 },    /* K0 */
  54. X/* 28 */    { 0.61098,        0.60693,        0.50828 },    /* K2 */
  55. X/* 29 */    { 0.63856,        0.60977,        0.46950 },    /* K5 */
  56. X/* 30 */    { 0.68698,        0.60595,        0.40110 },    /* M0 */
  57. X/* 31 */    { 0.72528,        0.59434,        0.34744 },    /* M2 */
  58. X/* 32 */    { 0.75182,        0.58144,        0.31097 },    /* M3 */
  59. X/* 33 */    { 0.78033,        0.56272,        0.27282 },    /* M4 */
  60. X/* 34 */    { 0.81066,        0.53676,        0.23394 },    /* M5 */
  61. X/* 35 */    { 0.84247,        0.50195,        0.19570 },    /* M6 */
  62. X/* 36 */    { 0.87512,        0.45667,        0.16004 },    /* M7 */
  63. X/* 37 */    { 0.71033,        0.59983,        0.36829 },    /* N0 */
  64. X/* 38 */    { 0.78625,        0.55816,        0.26507 },    /* N3 */
  65. X/* 39 */    { 0.93792,        0.33011,        0.10649 },    /* N8 */
  66. X/* 40 */    { 0.94897,        0.29906,        0.10012 },    /* N9 */
  67. X/* 41 */    { 0.79832,        0.54811,        0.24950 },    /* S4 */
  68. X/* 42 */    { 0.38241,        0.45743,        0.80282 },    /* O  */
  69. X
  70. X/* 43 */    { 0.500, 0, 0},              /* r0 */
  71. X/* 44 */    { 0.750, 0, 0},              /* r3 */
  72. X/* 45 */    { 0.875, 0, 0},              /* r6 */
  73. X/* 46 */    { 1.000, 0, 0},              /* r9 */
  74. X/* 47 */    { 0, 0.500, 0},              /* g0 */
  75. X/* 48 */    { 0, 0.750, 0},              /* g3 */
  76. X/* 49 */    { 0, 0.875, 0},              /* g6 */
  77. X/* 50 */    { 0, 1.000, 0},              /* g9 */
  78. X/* 51 */    { 0, 0, 0.500},              /* b0 */
  79. X/* 52 */    { 0, 0, 0.750},              /* b3 */
  80. X/* 53 */    { 0, 0, 0.875},              /* b6 */
  81. X/* 54 */    { 0, 0, 1.000},              /* b9 */
  82. X/* 55 */    { 0.500, 0.500, 0},          /* y0 */
  83. X/* 56 */    { 0.750, 0.750, 0},          /* y3 */
  84. X/* 57 */    { 0.875, 0.875, 0},          /* y6 */
  85. X/* 58 */    { 1.000, 1.000, 0},          /* y9 */
  86. X/* 59 */    { 0, 0.500, 0.500},          /* c0 */
  87. X/* 60 */    { 0, 0.750, 0.750},          /* c3 */
  88. X/* 61 */    { 0, 0.875, 0.875},          /* c6 */
  89. X/* 62 */    { 0, 1.000, 1.000},          /* c9 */
  90. X/* 63 */    { 0.500, 0, 0.500},          /* p0 */
  91. X/* 64 */    { 0.750, 0, 0.750},          /* p3 */
  92. X/* 65 */    { 0.875, 0, 0.875},          /* p6 */
  93. X/* 66 */    { 1.000, 0, 1.000},          /* p9 */
  94. X/* 67 */    { 0.500, 0.250, 0.000},      /* o0 */
  95. X/* 68 */    { 0.750, 0.375, 0.000},      /* o3 */
  96. X/* 69 */    { 0.875, 0.4375, 0.000},     /* o6 */
  97. X/* 70 */    { 1.000, 0.500, 0.000},      /* o9 */
  98. X/* 71 */    { 0.500, 0.500, 0.500},      /* w0 */
  99. X/* 72 */    { 0.750, 0.750, 0.750},      /* w3 */
  100. X/* 73 */    { 0.875, 0.875, 0.875},      /* w6 */
  101. X/* 74 */    { 1.000, 1.000, 1.000},      /* w9 */
  102. X  };
  103. X
  104. X  if (!color_postscript) return;
  105. X
  106. X  class = 0;
  107. X  while (table[class] && (table[class] != color_str[0])) class++;
  108. X
  109. X  subclass = isdigit(color_str[1]) ? color_str[1] - '0' : 0;
  110. X  colr = table[class] ? 10 + super_spectra[class][subclass] : WHITE;
  111. X
  112. X/*
  113. X    fprintf(outf, "%d '%s' scolor\n", colr, color_str);
  114. X*/
  115. X  if (colr != cur_colr)
  116. X    if (colr == WHITE)
  117. X      fprintf(outf, "0 0 0 srgb\n");
  118. X    else
  119. X      fprintf(outf, "%f %f %f srgb\n",
  120. X         ctab[colr].r, ctab[colr].g, ctab[colr].b); 
  121. X/*
  122. X      fprintf(outf, "%f %f %f setrgbcolor\n%% %s\n",
  123. X         ctab[colr].r, ctab[colr].g, ctab[colr].b, color_str); 
  124. X*/
  125. X
  126. X  cur_colr = colr;
  127. X}
  128. X
  129. X/*
  130. Xstatic int c_font = -1, c_size = -1;
  131. Xstatic char *c_fname = "/Times-Roman";
  132. X*/
  133. X/* Set the font and font size to be used for text. */
  134. X/* Note order of args */
  135. XD_fontsize(fsize, font)
  136. X     int fsize;    /* Size of font */
  137. X     int font;    /* e.g. TIMES, HELV, TIMES+ITALIC */
  138. X{
  139. X
  140. X/*  fprintf(outf, "%%fontsize %d %d\n", font, fsize);*/
  141. X
  142. X  /* override some requests */
  143. X  switch(cur_function) {
  144. X  case CHRTOUTLN:
  145. X    break;
  146. X  case CHRTHTICK:
  147. X  case CHRTVTICK:
  148. X    font = TIMESBOLD;
  149. X    break;
  150. X  case GRID_RA:
  151. X  case GRID_DEC:
  152. X  case ECLIPT:
  153. X    break;
  154. X  case CONSTBOUND:
  155. X  case CONSTPATTRN:
  156. X    break;
  157. X  case CONSTNAME:
  158. X    font = HELVITAL;
  159. X    break;
  160. X  case CHARTFILE:
  161. X    break;
  162. X  }
  163. X
  164. X  if ((fsize == c_size) && (font == c_font)) return;
  165. X
  166. X  switch(font) {
  167. X  case TIMESROMAN:
  168. X    c_fname = "/Times-Roman";
  169. X    break;
  170. X  case TIMESBOLD:
  171. X    c_fname = "/Times-Bold";
  172. X    break;
  173. X  case TIMESITAL:
  174. X    c_fname = "/Times-Italic";
  175. X    break;
  176. X  case TIMESBOLDITAL:
  177. X    c_fname = "/Times-BoldItalic";
  178. X    break;
  179. X  case HELV:
  180. X    c_fname = "/Helvetica";
  181. X    break;
  182. X  case HELVBOLD:
  183. X    c_fname = "/Helvetica-Bold";
  184. X    break;
  185. X  case HELVITAL:
  186. X    c_fname = "/Helvetica-Oblique";
  187. X    break;
  188. X  case HELVBOLDITAL:
  189. X    c_fname = "/Helvetica-BoldOblique";
  190. X    break;
  191. X  case COURIER:
  192. X    c_fname = "/Courier";
  193. X    break;
  194. X  case COURBOLD:
  195. X    c_fname = "/Courier-Bold";
  196. X    break;
  197. X  case COURITAL:
  198. X    c_fname = "/Courier-Oblique";
  199. X    break;
  200. X  case COURITALBOLD:
  201. X    c_fname = "/Courier-BoldOblique";
  202. X    break;
  203. X  default:
  204. X    font = CURNTFONT;
  205. X    break;
  206. X  };
  207. X
  208. X/* This doesn't work, since currentfont is already scaled
  209. X  if (font == CURNTFONT)
  210. X    fprintf(outf, "%d cfsize\n", fsize);
  211. X  else
  212. X    fprintf(outf, "%d %s fontsz\n", fsize, c_fname);
  213. X*/
  214. X
  215. X  fprintf(outf, "%d %s fontsz\n", fsize, c_fname);
  216. X  c_size = fsize;
  217. X  c_font = font;
  218. X}
  219. X/* This routine is encouraged to look at the extern cur_funtion
  220. X   and change the font used as desired */
  221. X
  222. X/*
  223. X * Additions for Greek fonts
  224. X */
  225. Xstatic char  *intable = " abgdezh@iklmnEoprstu0x%w";
  226. Xstatic char *outtable = " abgdezhqiklmnxoprstujcyw";
  227. X
  228. X/* Display text string str at x,y, in current font and font size.
  229. X   if star_lbl is TRUE, string is a star label, use
  230. X      greek characters (if possible) */
  231. XD_text(x, y, str, star_lbl)
  232. X     int x, y;
  233. X     char *str;
  234. X     int star_lbl;
  235. X{
  236. X  char ch;
  237. X  int i, j, k;
  238. X
  239. X
  240. X  /* Note: this ends current line */
  241. X  D_move(x,y);
  242. X
  243. X  /* Always issue a moveto.  D_move won't if current point is the point
  244. X     to move to.  For text which follows a previous text, this is wrong.
  245. X     e.g. "100 100 mt (asdf) lbshw (jkl) lbshw" produces "asdfjkl" instead
  246. X     of overwriting asdf with jkl. */
  247. X  fprintf(outf, "%d %d mt\n", x, y);
  248. X
  249. X  if (!star_lbl) {
  250. X    fprintf(outf, "(%s) lbshw\n", str);
  251. X  } else {
  252. X    if (isgreek(str[0]) && (isdigit(str[1]) || (str[1] == ' '))) {
  253. X      /* Greek if first character is greek encoded,
  254. X     and the second is space or a digit */
  255. X      /* Translate yaleformat greek encoding to Symbol font encoding */
  256. X#ifdef OLD_GREEK
  257. X      i = 0;
  258. X      while (ch = str[i])
  259. X    {
  260. X      j = 0;
  261. X      while (intable[j] && (intable[j] != ch)) j++;
  262. X      str[i] = intable[j] ? outtable[j] : str[i];
  263. X      /* If not in translation table, leave it alone */
  264. X      i++;
  265. X    }
  266. X#endif
  267. X      fprintf(outf, "(%s) gshow\n", str);
  268. X    } else { /* Star label, but not greek */
  269. X    /* remove leading spaces */
  270. X    while (*str == ' ') str++;
  271. X    fprintf(outf, "(%s) obshw\n", str);
  272. X    }
  273. X  }
  274. X
  275. X  vecstate = S_UNDEF;
  276. X}
  277. X
  278. Xisgreek(c)
  279. Xchar c;
  280. X{
  281. X  char *cp;
  282. X
  283. X#ifdef OLD_GREEK
  284. X  cp = "abgdezh@iklmnEoprstuOx%w";
  285. X#else
  286. X  cp = "abgdezhqiklmnxoprstujcywf"; /* f and j are both phi */ 
  287. X#endif
  288. X  while (*cp && (*cp != c)) cp++;
  289. X  return (*cp != '\0'); /* True if letter was in greek string */
  290. X}
  291. X
  292. X
  293. X
  294. X/* Return input coordinate in device coords where there are pointing devices */
  295. XD_inxy(x, y)
  296. X     int *x, *y;
  297. X{
  298. X}
  299. X
  300. X
  301. X/* Put non-displayed comment in output.  Allowed in postscript, but
  302. X   few other drivers will be able to support this. */ 
  303. XD_comment(str)
  304. X     char *str;
  305. X{
  306. X  fprintf(outf, "%%%s\n", str);
  307. X}
  308. X
  309. X
  310. X/**
  311. XHigher level functions
  312. X**/
  313. X
  314. X/* Point sizes for font calls */
  315. X#define TITLESIZE 16
  316. X#define SUBTLSIZE 12
  317. X#define NAMESIZE 10
  318. X#define LBLSIZE 8
  319. X#define MAGSIZE 8
  320. X
  321. X/* Fonts for font calls */
  322. X#define NAMEFNT TIMESROMAN
  323. X#define LBLFNT HELV
  324. X#define MAGFNT COURIER
  325. X#define TITLEFNT TIMESBOLD
  326. X#define SUBTLFNT TIMESROMAN
  327. X
  328. Xint x_nameoffset = MAG0_RAD+ResPT, y_nameoffset = 0;
  329. Xint x_lbloffset = MAG3_RAD, y_lbloffset = MAG3_RAD+ResPT/2;
  330. Xint x_magoffset = MAG3_RAD+ResPT, y_magoffset = -MAG3_RAD-ResPT;
  331. X
  332. X/* Interface Function */
  333. X/* Draw object at x, y.  properties set by other parameters */
  334. Xdrawobj(x, y, mag, type, color_str, label_field, con_str, obj_name,
  335. X    comment_str, file_line,
  336. X    draw_glyph, draw_text, use_lbl, use_name, use_mag)
  337. X
  338. X     int x, y;
  339. X     double mag;    /* Magnitude of object */
  340. X     char *type;    /* 2 chars, object code and subcode */
  341. X     char *color_str;    /* 2 chars, spectral type for stars, 
  342. X               color code otherwise */
  343. X     char *label_field;    /* 2 chars, Bayer or flamsteed for stars,
  344. X               size in seconds for nebulae and
  345. X               planets */
  346. X     char *con_str;    /* 3 chars, the constellation the object is in */
  347. X     char *obj_name;    /* Name of object */
  348. X     char *comment_str;    /* Comment field */
  349. X     char *file_line;    /* The full line from the file,
  350. X               containing the above if it is in
  351. X               standard format */
  352. X     int draw_glyph;    /* Draw object symbol */
  353. X     int draw_text;    /* Draw text */
  354. X     int use_lbl;    /* Label object with the label_field string */
  355. X     int use_name;    /* Label object with the obj_name string */
  356. X     int use_mag;    /* Label object with a 2 or 3 character string
  357. X               containing the magnitude * 10 without
  358. X               decimal point */
  359. X{
  360. X  char magstr[10];
  361. X
  362. X/*fprintf(stderr, "%d %d %f <%s> <%s> <%s> <%s> <%s> <%s> <%s>\n", x, y, mag,
  363. X    type, color_str, label_field, con_str, obj_name, comment_str,
  364. X    file_line);*/
  365. X
  366. X  if (draw_glyph)
  367. X    switch(type[0]) {
  368. X    case 'S':    drawStar(x,y,mag,type[1],color_str);
  369. X      break;
  370. X    case 'P':    drawPlan(x,y,mag,type[1],color_str, size_obj(label_field),
  371. X             comment_str);
  372. X      break;
  373. X    case 'N':    drawNebu(x,y,mag,type[1],color_str, size_obj(label_field));
  374. X      break;
  375. X    case 'G':    drawGalx(x,y,mag,type[1],color_str, size_obj(label_field));
  376. X      break;
  377. X    case 'C':    drawClus(x,y,mag,type[1],color_str, size_obj(label_field));
  378. X      break;
  379. X    case 'U':
  380. X      drawUnknown(x,y,mag,type[1],color_str, size_obj(label_field));
  381. X      break;
  382. X    case 'O':
  383. X      drawOther(x,y,mag,type[1],color_str, size_obj(label_field));
  384. X      break;
  385. X    case 'V':
  386. X    case 'A':
  387. X    case 'I':
  388. X      break;
  389. X    case '#':
  390. X    default:
  391. X      break;
  392. X    };
  393. X
  394. X
  395. X/*
  396. X * use name or label
  397. X */
  398. X  if (draw_text) {
  399. X    if (type[0] == 'I')
  400. X      D_color(color_str);
  401. X    else
  402. X      D_color("  ");
  403. X
  404. X    if (use_name && obj_name[0]) {
  405. X      D_fontsize(NAMESIZE, NAMEFNT);
  406. X      D_text(x+x_nameoffset, y+y_nameoffset, obj_name, FALSE);
  407. X    } else if (use_lbl &&
  408. X           ((label_field[0] != ' ') || (label_field[1] != ' '))) {
  409. X      D_fontsize(LBLSIZE, LBLFNT);
  410. X      D_text(x+x_lbloffset, y+y_lbloffset, label_field, TRUE);
  411. X    }
  412. X/* If you want to mag label other objects, change this */
  413. X    if (use_mag && (type[0] == 'S')) {
  414. X      sprintf(magstr, "%02d", (int)(mag*10.0+0.5));
  415. X      D_fontsize(MAGSIZE, MAGFNT);
  416. X      D_text(x+x_magoffset, y+y_magoffset, magstr, FALSE);
  417. X    }
  418. X  }
  419. X}
  420. X
  421. XdrawStar(x, y, mag, type, color)
  422. X     int x, y;
  423. X     double mag;
  424. X     char type, *color;
  425. X{
  426. X  char *code;
  427. X  double truemag = mag;
  428. X
  429. X/* Not used anymore, all labels are the same size.
  430. X  switch ((int)(mag+0.5))
  431. X    {
  432. X    case -1: D_fontsize(18, CURNTFONT); break;
  433. X    case  0: D_fontsize(18, CURNTFONT); break;
  434. X    case  1: D_fontsize(16, CURNTFONT); break;
  435. X    case  2: D_fontsize(14, CURNTFONT); break;
  436. X    case  3: D_fontsize(12, CURNTFONT); break;
  437. X    case  4: D_fontsize(8, CURNTFONT); break;
  438. X    default: D_fontsize(6, CURNTFONT); break;
  439. X    }
  440. X*/
  441. X
  442. X  if (cur_map_type == THUMBNAIL) mag += thumbshift;
  443. X                /* Shrink stars for thumbnail */
  444. X  else {
  445. X    if (mag < brightest_used) brightest_used = mag;
  446. X    if (mag > faintest_used) faintest_used = mag;
  447. X  }
  448. X
  449. X  if (mag<MAG_BRIGHT) mag = MAG_BRIGHT;
  450. X  if (mag>MAG_DIM) mag = MAG_DIM;
  451. X
  452. X  switch (type)
  453. X    {
  454. X    default:
  455. X    case 'S': code = "s"; break;
  456. X    case 'D': code = "d"; break;
  457. X    case 'V': code = "v"; break;
  458. X    }
  459. X
  460. X  /* Note: this ends current line */
  461. X  D_move(x,y);
  462. X
  463. X  D_color(color);
  464. X  if (use_fine_mag) {
  465. X    /* use fine magnitude scale */
  466. X#ifdef USE_FINE_MACROS
  467. X    if ((mag*10+0.5) < 0)
  468. X      fprintf(outf, "%d %d s%s_%02d\n", x, y, code, - (int) (mag*10+0.5));
  469. X    else
  470. X      fprintf(outf, "%d %d s%s%02d\n", x, y, code, (int) (mag*10+0.5));
  471. X#else
  472. X    fprintf(outf, "%d %d %d %s %% %.2f\n", x, y,
  473. X       mag10sizes[(int) ((mag - MAG_BRIGHT)*10.0)], code, truemag);
  474. X#endif
  475. X  }else {
  476. X    if (mag < -0.5) /* rounded mag is less than 0 */
  477. X      fprintf(outf, "%d %d %s_1\n", x, y, code); /* MAG_BRIGHT == -1 */
  478. X    else
  479. X      fprintf(outf, "%d %d %s%d\n", x, y, code, (int) (mag+0.5));
  480. X  }
  481. X
  482. X  vecstate = S_UNDEF;
  483. X}
  484. X
  485. XdrawPlan(x, y, mag, type, color, plansize, comment_str)
  486. X     int x,y;
  487. X     double mag;
  488. X     char type, *color;
  489. X     long plansize;
  490. X     char *comment_str;
  491. X{
  492. X  int diam;
  493. X  int n;
  494. X  double phase, chi;
  495. X
  496. X  /* Note: this ends current line */
  497. X  D_move(x,y);
  498. X
  499. X  D_color(color);
  500. X  fprintf(outf, "%%diam %.3f\n", (plansize/(3600.*xf_c_scale)+.5));
  501. X  diam = (int) (plansize/(3600.*xf_c_scale)+.5);
  502. X  if (diam < 12*ResPT)
  503. X    diam = 12*ResPT;
  504. X/*
  505. Xfprintf(outf, "%%xf_c_scale %f\n", xf_c_scale);
  506. Xfprintf(outf, "%%size %d\n", plansize);
  507. Xfprintf(outf, "%%points %f\n", plansize/(3600.*xf_c_scale));
  508. Xfprintf(outf, "%%diam %d\n", diam);*/
  509. X
  510. X  switch(type)
  511. X    {
  512. X    case 'A': fprintf(outf, "%d %d %d asteroid\n", x, y, diam); break;
  513. X    case 'C':
  514. X      phase = 45.0;
  515. X      n = sscanf(comment_str, "%lf", &phase);
  516. X      fprintf(outf, "%%phase %f\n", phase);
  517. X      if (cur_win->invert) phase = 180 - phase;
  518. X      fprintf(outf, "%d %d %f %d comet\n", x, y, phase, diam);
  519. X      break;
  520. X
  521. X    case 'S': fprintf(outf, "%d %d %d sun\n", x, y, diam); break;
  522. X    case 'L':
  523. X      phase = 0.0;
  524. X      chi = 90.0;
  525. X      n = sscanf(comment_str, "%lf %lf", &phase, &chi);
  526. X      fprintf(outf, "%%phase: %f chi: %f\n", phase, chi);
  527. X      if (cur_win->invert) chi = 180 - chi;
  528. X      fprintf(outf, "%d %d %d %f %f moon\n", x, y, diam, phase, chi);
  529. X      break;
  530. X
  531. X    case 'M': fprintf(outf, "%d %d %d mercury\n", x, y, diam); break;
  532. X    case 'V': fprintf(outf, "%d %d %d venus\n", x, y, diam); break;
  533. X    case 'm': fprintf(outf, "%d %d %d mars\n", x, y, diam); break;
  534. X    case 'J': fprintf(outf, "%d %d %d jupiter\n", x, y, diam); break;
  535. X    case 's': fprintf(outf, "%d %d %d saturn\n", x, y, diam); break;
  536. X    case 'U': fprintf(outf, "%d %d %d uranus\n", x, y, diam); break;
  537. X    case 'N': fprintf(outf, "%d %d %d neptune\n", x, y, diam); break;
  538. X    case 'P': fprintf(outf, "%d %d %d pluto\n", x, y, diam); break;
  539. X    default:  fprintf(outf, "%d %d %d planet\n", x, y, diam);
  540. X    }
  541. X
  542. X  vecstate = S_UNDEF;
  543. X  D_color("  ");
  544. X}
  545. X
  546. XdrawGalx(x, y, mag, type, color, nebsize)
  547. X     int x,y;
  548. X     double mag;
  549. X     char type, *color;
  550. X     long nebsize;        /* -1 should give default size */
  551. X{
  552. X  int diam;
  553. X
  554. X  /* Note: this ends current line */
  555. X  D_move(x,y);
  556. X  D_color(color);
  557. X
  558. X  diam = (int) (nebsize/(3600.*xf_c_scale)+.5);
  559. X  if (diam < 6*ResPT)
  560. X    diam = 6*ResPT;
  561. X/*
  562. Xfprintf(outf, "%%xf_c_scale %f\n", xf_c_scale);
  563. Xfprintf(outf, "%%size %d\n", nebsize);
  564. Xfprintf(outf, "%%points %f\n", nebsize/(3600.*xf_c_scale));
  565. Xfprintf(outf, "%%diam %d\n", diam);*/
  566. X
  567. X  switch(type)
  568. X    {
  569. X    case 'a':
  570. X    case 'b':
  571. X    case 'c':
  572. X    case 'd':
  573. X    case 'B':
  574. X    case 'S':
  575. X    case 'O':
  576. X      fprintf(outf, "%d %d %d galaxys\n", x, y, diam);
  577. X      break;
  578. X    case 'Q':
  579. X      fprintf(outf, "%d %d %d galaxyq\n", x, y, diam);
  580. X      break;
  581. X    case 'E':
  582. X    case 'I':
  583. X    case 'G':
  584. X      fprintf(outf, "%d %d %d galaxye\n", x, y, diam);
  585. X      break;
  586. X    default:
  587. X      fprintf(outf, "%d %d %d galaxy\n", x, y, diam);
  588. X    }
  589. X
  590. X  vecstate = S_UNDEF;
  591. X  D_color("  ");
  592. X}
  593. X
  594. XdrawNebu(x, y, mag, type, color, nebsize)
  595. X     int x,y;
  596. X     double mag;
  597. X     char type, *color;
  598. X     long nebsize;        /* -1 should give default size */
  599. X{
  600. X  int diam;
  601. X
  602. X  /* Note: this ends current line */
  603. X  D_move(x,y);
  604. X  D_color(color);
  605. X
  606. X  diam = (int) (nebsize/(3600.*xf_c_scale)+.5);
  607. X  if (diam < 6*ResPT)
  608. X    diam = 6*ResPT;
  609. X/*
  610. Xfprintf(outf, "%%xf_c_scale %f\n", xf_c_scale);
  611. Xfprintf(outf, "%%size %d\n", nebsize);
  612. Xfprintf(outf, "%%points %f\n", nebsize/(3600.*xf_c_scale));
  613. Xfprintf(outf, "%%diam %d\n", diam);*/
  614. X
  615. X  switch(type)
  616. X    {
  617. X    case 'P': fprintf(outf, "%d %d %d nebulap\n", x, y, diam); break;
  618. X    case 'D': fprintf(outf, "%d %d %d nebulad\n", x, y, diam); break;
  619. X    default:  fprintf(outf, "%d %d %d nebula\n", x, y, diam);
  620. X    }
  621. X
  622. X  vecstate = S_UNDEF;
  623. X  D_color("  ");
  624. X}
  625. X
  626. XdrawClus(x, y, mag, type, color, nebsize)
  627. X     int x,y;
  628. X     double mag;
  629. X     char type, *color;
  630. X     long nebsize;        /* -1 should give default size */
  631. X{
  632. X  int diam;
  633. X
  634. X  /* Note: this ends current line */
  635. X  D_move(x,y);
  636. X  D_color(color);
  637. X
  638. X  diam = (int) (nebsize/(3600.*xf_c_scale)+.5);
  639. X  if (diam < 6*ResPT)
  640. X    diam = 6*ResPT;
  641. X/*
  642. Xfprintf(outf, "%%xf_c_scale %f\n", xf_c_scale);
  643. Xfprintf(outf, "%%size %d\n", nebsize);
  644. Xfprintf(outf, "%%points %f\n", nebsize/(3600.*xf_c_scale));
  645. Xfprintf(outf, "%%diam %d\n", diam);*/
  646. X  switch(type)
  647. X    {
  648. X    case 'G': fprintf(outf, "%d %d %d clusterg\n", x, y, diam); break;
  649. X    case 'O': fprintf(outf, "%d %d %d clustero\n", x, y, diam); break;
  650. X    default: fprintf(outf, "%d %d %d cluster\n", x, y, diam);
  651. X    }
  652. X
  653. X  vecstate = S_UNDEF;
  654. X  D_color("  ");
  655. X}
  656. X
  657. XdrawUnknown(x, y, mag, type, color, nebsize)
  658. X     int x,y;
  659. X     double mag;
  660. X     char type, *color;
  661. X     long nebsize;        /* -1 should give default size */
  662. X{
  663. X  int diam;
  664. X
  665. X  /* Note: this ends current line */
  666. X  D_move(x,y);
  667. X  D_color(color);
  668. X
  669. X  diam = (int) (nebsize/(3600.*xf_c_scale)+.5);
  670. X  if (diam < 6*ResPT)
  671. X    diam = 6*ResPT;
  672. X/*
  673. Xfprintf(outf, "%%xf_c_scale %f\n", xf_c_scale);
  674. Xfprintf(outf, "%%size %d\n", nebsize);
  675. Xfprintf(outf, "%%points %f\n", nebsize/(3600.*xf_c_scale));
  676. Xfprintf(outf, "%%diam %d\n", diam);*/
  677. X
  678. X  switch(type)
  679. X    {
  680. X    default:  fprintf(outf, "%d %d %d unknown_u\n", x, y, diam);
  681. X    }
  682. X
  683. X  vecstate = S_UNDEF;
  684. X  D_color("  ");
  685. X}
  686. X
  687. X
  688. XdrawOther(x, y, mag, type, color, nebsize)
  689. X     int x,y;
  690. X     double mag;
  691. X     char type, *color;
  692. X     long nebsize;        /* -1 should give default size */
  693. X{
  694. X  int diam;
  695. X
  696. X  /* Note: this ends current line */
  697. X  D_move(x,y);
  698. X  D_color(color);
  699. X
  700. X  diam = (int) (nebsize/(3600.*xf_c_scale)+.5);
  701. X  if (diam < 6*ResPT)
  702. X    diam = 6*ResPT;
  703. X/*
  704. Xfprintf(outf, "%%xf_c_scale %f\n", xf_c_scale);
  705. Xfprintf(outf, "%%size %d\n", nebsize);
  706. Xfprintf(outf, "%%points %f\n", nebsize/(3600.*xf_c_scale));
  707. Xfprintf(outf, "%%diam %d\n", diam);*/
  708. X  switch(type)
  709. X    {
  710. X    default:  fprintf(outf, "%d %d %d other_o\n", x, y, diam);
  711. X    }
  712. X
  713. X  vecstate = S_UNDEF;
  714. X  D_color("  ");
  715. X}
  716. X
  717. X
  718. X/* Want three legend columns, in 10 rows, with a title and subtitle above:
  719. Xtitle
  720. Xsubtitle (ra, dec, lim)
  721. X
  722. X    -1                0                1
  723. X     2                3                4
  724. X     5                6                7
  725. X     8                9               10
  726. X     double           variable
  727. X     planet           asteroid        comet
  728. X     cluster          globular        open
  729. X     nebula           planetary       diffuse
  730. X     galaxy           elliptical      spiral
  731. X     unknown          other           quasar
  732. X
  733. Xstar columns x coordinates are at star_x_col[];
  734. Xstar row y coordinates are star_y_row[];
  735. Xother at oth_x_col[] and oth_y_row[];
  736. X
  737. Xtitle and subtitle coordinates are defined by L_TIL_{X,Y} and L_STIL_{X,Y}
  738. XLabels are placed as in drawobj().
  739. X
  740. Xfor fullpage map, only the title and subtitle are displayed, on one line. */
  741. X
  742. Xstatic int star_x_col[] = {
  743. X  36*ResPT,
  744. X  108*ResPT,
  745. X  180*ResPT,
  746. X  36*ResPT,
  747. X  108*ResPT,
  748. X  180*ResPT,
  749. X  36*ResPT,
  750. X  108*ResPT,
  751. X  180*ResPT,
  752. X  36*ResPT,
  753. X  108*ResPT,
  754. X  180*ResPT,
  755. X  36*ResPT,
  756. X  108*ResPT,
  757. X  180*ResPT};
  758. X
  759. Xstatic int oth_x_col[] = {
  760. X  36*ResPT,
  761. X  108*ResPT,
  762. X  180*ResPT,
  763. X  36*ResPT,
  764. X  108*ResPT,
  765. X  180*ResPT,
  766. X  36*ResPT,
  767. X  108*ResPT,
  768. X  180*ResPT,
  769. X  36*ResPT,
  770. X  108*ResPT,
  771. X  180*ResPT,
  772. X  36*ResPT,
  773. X  108*ResPT,
  774. X  180*ResPT};
  775. X
  776. X
  777. X#define L_TIL_X 36*ResPT
  778. X#define L_TIL_Y 180*ResPT
  779. X#define L_STIL_X 36*ResPT
  780. X#define L_STIL_Y (L_TIL_Y - 18*ResPT)
  781. X
  782. X/* (let ((i 0))
  783. X  (while (< i 10)
  784. X    (princ (format "\n  %d*ResPT," (+ 36 (* (- 9 i) 12))))
  785. X    (setq i (1+ i)))
  786. X    nil) */
  787. X
  788. Xstatic int star_y_row[] = {
  789. X  144*ResPT,
  790. X  144*ResPT,
  791. X  144*ResPT,
  792. X  132*ResPT,
  793. X  132*ResPT,
  794. X  132*ResPT,
  795. X  120*ResPT,
  796. X  120*ResPT,
  797. X  120*ResPT,
  798. X  108*ResPT,
  799. X  108*ResPT,
  800. X  108*ResPT,
  801. X  96*ResPT,
  802. X  96*ResPT,
  803. X  96*ResPT
  804. X};
  805. X
  806. Xstatic int oth_y_row[] = {
  807. X  84*ResPT,
  808. X  84*ResPT,
  809. X  84*ResPT,
  810. X  72*ResPT,
  811. X  72*ResPT,
  812. X  72*ResPT,
  813. X  60*ResPT,
  814. X  60*ResPT,
  815. X  60*ResPT,
  816. X  48*ResPT,
  817. X  48*ResPT,
  818. X  48*ResPT,
  819. X  36*ResPT,
  820. X  36*ResPT,
  821. X  36*ResPT};
  822. X
  823. Xstatic int starmags[12];
  824. Xstatic int magbright, magfaint;
  825. X#define L_X_FULLPAGE_CAPT 18*ResPT
  826. X#define L_Y_FULLPAGE_CAPT 25*ResPT
  827. X
  828. Xchartlegend(win)
  829. X     mapwindow *win;
  830. X{
  831. X  char ras[20], dls[20], outstr[40], magstr[20];
  832. X  int i, j, xcen, ycen;
  833. X  int nummags;
  834. X
  835. X  if (!title[0]) title = "LEGEND";
  836. X  rastr(ras, win->racen);
  837. X  declstr(dls, win->dlcen);
  838. X
  839. X  if (win->map_type != FULLPAGEMAP) {
  840. X    sprintf(outstr, "(%s,%s lim: %2.1f)", ras, dls, win->maglim);
  841. X    D_fontsize(TITLESIZE, TITLEFNT); D_text(L_TIL_X, L_TIL_Y, title, FALSE);
  842. X    D_fontsize(SUBTLSIZE, SUBTLFNT); D_text(L_STIL_X, L_STIL_Y, outstr, FALSE);
  843. X
  844. X    D_fontsize(10, NAMEFNT);
  845. X
  846. X    /* set magnitudes in legend */
  847. X
  848. X    if (brightest_used > faintest_used) {
  849. X      brightest_used = 0.0;
  850. X      faintest_used = 10.0;
  851. X    }
  852. X
  853. X    magbright = brightest_used - 0.5;
  854. X    magfaint = faintest_used + 0.5;
  855. X    if (magfaint > MAG_DIM) magfaint = MAG_DIM;
  856. X    if (magbright < MAG_BRIGHT) magbright = MAG_BRIGHT;
  857. X    if (magbright < (magfaint - 11)) magbright = (magfaint - 11);
  858. X    nummags = magfaint - magbright + 1;
  859. X    for (i = magbright; i <= magfaint; i++) {
  860. X      starmags[i-magbright] = i;
  861. X    }
  862. X
  863. X    for (i = 0; i < nummags; i++) {
  864. X      drawStar(star_x_col[i], star_y_row[i], (double) starmags[i], 'S', "  ");
  865. X      sprintf(magstr, " %d", starmags[i]);
  866. X      D_text(star_x_col[i]+x_nameoffset, star_y_row[i]+y_nameoffset,
  867. X         magstr, FALSE);
  868. X    }
  869. X
  870. X    drawStar(star_x_col[13], star_y_row[13],
  871. X         ((magbright+magfaint)/2.0),
  872. X         'D', "  ");
  873. X    D_text(star_x_col[13]+x_nameoffset, star_y_row[13]+y_nameoffset,
  874. X       "double", FALSE);
  875. X
  876. X    drawStar(star_x_col[14], star_y_row[14],
  877. X         ((magbright+magfaint)/2.0),
  878. X         'V', "  ");
  879. X    D_text(star_x_col[14]+x_nameoffset, star_y_row[14]+y_nameoffset,
  880. X       "variable", FALSE);
  881. X
  882. X
  883. X
  884. X    i = 0;
  885. X    drawPlan(oth_x_col[i], oth_y_row[i], 1.0, 'u', "  ", (long) -1, "");
  886. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  887. X       "Planet", FALSE);
  888. X    i++;
  889. X
  890. X    drawPlan(oth_x_col[i], oth_y_row[i], 1.0, 'A', "  ", (long) -1, "");
  891. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  892. X       "Asteroid", FALSE);
  893. X    i++;
  894. X
  895. X    drawPlan(oth_x_col[i], oth_y_row[i], 1.0, 'C', "  ", (long) -1, "");
  896. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  897. X       "Comet", FALSE);
  898. X    i++;
  899. X
  900. X    drawClus(oth_x_col[i], oth_y_row[i], 1.0, 'u', "  ", (long) -1);
  901. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  902. X       "Cluster", FALSE);
  903. X    i++;
  904. X
  905. X    drawClus(oth_x_col[i], oth_y_row[i], 1.0, 'G', "  ", (long) -1);
  906. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  907. X       "Globular", FALSE);
  908. X    i++;
  909. X
  910. X    drawClus(oth_x_col[i], oth_y_row[i], 1.0, 'O', "  ", (long) -1);
  911. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  912. X       "Open", FALSE);
  913. X    i++;
  914. X
  915. X
  916. X    drawNebu(oth_x_col[i], oth_y_row[i], 1.0, 'u', "  ", (long) -1);
  917. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  918. X       "Nebula", FALSE);
  919. X    i++;
  920. X
  921. X    drawNebu(oth_x_col[i], oth_y_row[i], 1.0, 'P', "  ", (long) -1);
  922. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  923. X       "Planetary", FALSE);
  924. X    i++;
  925. X
  926. X    drawNebu(oth_x_col[i], oth_y_row[i], 1.0, 'D', "  ", (long) -1);
  927. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  928. X       "Diffuse", FALSE);
  929. X    i++;
  930. X
  931. X
  932. X    drawGalx(oth_x_col[i], oth_y_row[i], 1.0, 'u', "  ", (long) -1);
  933. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  934. X       "Galaxy", FALSE);
  935. X    i++;
  936. X
  937. X    drawGalx(oth_x_col[i], oth_y_row[i], 1.0, 'E', "  ", (long) -1);
  938. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  939. X       "Elliptical", FALSE);
  940. X    i++;
  941. X
  942. X    drawGalx(oth_x_col[i], oth_y_row[i], 1.0, 'S', "  ", (long) -1);
  943. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  944. X       "Spiral", FALSE);
  945. X    i++;
  946. X
  947. X
  948. X    drawUnknown(oth_x_col[i], oth_y_row[i], 1.0, 'u', "  ", (long) -1);
  949. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  950. X       "Unknown", FALSE);
  951. X    i++;
  952. X
  953. X    drawOther(oth_x_col[i], oth_y_row[i], 1.0, 'o', "  ", (long) -1);
  954. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  955. X       "Other", FALSE);
  956. X    i++;
  957. X
  958. X    drawGalx(oth_x_col[i], oth_y_row[i], 1.0, 'Q', "  ", (long) -1);
  959. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  960. X       "Quasar", FALSE);
  961. X    i++;
  962. X
  963. X    /* Notebook mode */
  964. X#define NOTE_LEFT_COL 306
  965. X#define NOTE_RIGHT_COL 486
  966. X#define NOTE_TOP_ROW 144
  967. X#define NOTE_ROW_SPACE 14*ResPT
  968. X    i = 0;
  969. X    if (notebook_mode) {
  970. X      /* draw views */
  971. X      out("gsave");
  972. X      out("1 setlinewidth 2 setlinecap");
  973. X      out("[] 0 setdash 0 setgray");
  974. X      xcen = win->width/2 + win->x_offset;
  975. X      ycen = win->height/2 + win->y_offset;
  976. X      for (j = 0; j< numviews; j++) {
  977. X    fprintf(outf, "    newpath %d %d %f 0 360 arc stroke\n",
  978. X           xcen, ycen, viewrad[j]/win->c_scale);
  979. X      };
  980. Xout("grestore");
  981. X      out("12 /Helvetica fontsz");
  982. X      out("/rjust { dup stringwidth pop neg 0 rmoveto show} def");
  983. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  984. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  985. X      out("(Date:) rjust");
  986. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  987. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  988. X      out("(Time:) rjust");
  989. X      i++;
  990. X
  991. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  992. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  993. X      out("(Object Altitude:) rjust");
  994. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  995. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  996. X      out("() rjust");
  997. X      i++;
  998. X
  999. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  1000. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1001. X      out("(Instrument:) rjust");
  1002. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  1003. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1004. X      out("() rjust");
  1005. X      i++;
  1006. X
  1007. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  1008. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1009. X      out("(Eyepiece:) rjust");
  1010. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  1011. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1012. X      out("(Filter:) rjust");
  1013. X      i++;
  1014. X
  1015. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  1016. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1017. X      out("(Site:) rjust");
  1018. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  1019. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1020. X      out("() rjust");
  1021. X      i++;
  1022. X
  1023. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  1024. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1025. X      out("(Seeing:) rjust");
  1026. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  1027. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1028. X      out("(Transparency:) rjust");
  1029. X      i++;
  1030. X
  1031. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  1032. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1033. X      out("(Darkness:) rjust");
  1034. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  1035. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1036. X      out("(Magnitude limit:) rjust");
  1037. X      i++;
  1038. X
  1039. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  1040. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1041. X      out("(Wind:) rjust");
  1042. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  1043. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1044. X      out("() rjust");
  1045. X      i++;
  1046. X
  1047. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  1048. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1049. X      out("(Temperature:) rjust");
  1050. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  1051. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1052. X      out("(Dew:) rjust");
  1053. X      i++;
  1054. X    };
  1055. X
  1056. X  } else {
  1057. X    D_fontsize(8, NAMEFNT);
  1058. X    sprintf(outstr, "%s: %s,%s lim: %2.1f", title, ras, dls, win->maglim);
  1059. X    D_text(L_X_FULLPAGE_CAPT, L_Y_FULLPAGE_CAPT, outstr, FALSE);
  1060. X  }
  1061. X}
  1062. X
  1063. X
  1064. X
  1065. END_OF_FILE
  1066. if test 29553 -ne `wc -c <'starchart/spo.c.ab'`; then
  1067.     echo shar: \"'starchart/spo.c.ab'\" unpacked with wrong size!
  1068. fi
  1069. # end of 'starchart/spo.c.ab'
  1070. fi
  1071. echo shar: End of archive 16 \(of 32\).
  1072. cp /dev/null ark16isdone
  1073. MISSING=""
  1074. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 ; do
  1075.     if test ! -f ark${I}isdone ; then
  1076.     MISSING="${MISSING} ${I}"
  1077.     fi
  1078. done
  1079. if test "${MISSING}" = "" ; then
  1080.     echo You have unpacked all 32 archives.
  1081.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1082. else
  1083.     echo You still need to unpack the following archives:
  1084.     echo "        " ${MISSING}
  1085. fi
  1086. ##  End of shell archive.
  1087. exit 0
  1088.  
  1089.